import "./do-while";
import "./for";
import "./if";
import "./loop";
import "./try-catch";
import "./while";
import { GaRegExp, ruleInject, ruleInjectable } from "../InjectionRule";

// TODO need switch choose goto label
@ruleInjectable()
export default class proceduralRule extends GaRegExp {

	@ruleInject() private whilelRule!: GaRegExp;

	@ruleInject() private doWhilelRule!: GaRegExp;

	@ruleInject() private loopRule!: GaRegExp;

	@ruleInject() private forRule!: GaRegExp;

	@ruleInject() private ifRule!: GaRegExp;

	@ruleInject() private tryCatchRule!: GaRegExp;

	public RuleInit() {
		this.ParseRule([
			this.whilelRule, "|",
			this.doWhilelRule, "|",
			this.loopRule, "|",
			this.forRule, "|",
			this.ifRule, "|",
			this.tryCatchRule,
		]);
	}

}
